<%@ page contentType="text/html;charset=UTF-8" %>
<html>
    <head>
        <title>${eventoInstance.titulo}</title>
        <meta name="layout" content="front">
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    </head>
    <body>
        Titulo:   ${fieldValue(bean: eventoInstance, field: "titulo")}<br/>
        Informacion: ${fieldValue(bean: eventoInstance, field: "informacion")}<br/>
        descripcion: ${fieldValue(bean: eventoInstance, field: "descripcion")}<br/>
        Fecha Inicio: ${fieldValue(bean: eventoInstance, field: "fechaInicio")}<br/>
        Fecha Fin: ${fieldValue(bean: eventoInstance, field: "fechaFin")}<br/>
        Lugar: ${fieldValue(bean: eventoInstance, field: "direccion")}<br/>
        <g:if test="${eventoInstance.telefono}">
            Telefono: ${fieldValue(bean: eventoInstance, field: "telefono")}<br/>
        </g:if>
        <g:if test="${eventoInstance.telefono2}">
            Telefono alternativo: ${fieldValue(bean: eventoInstance, field: "telefono2")}<br/>
        </g:if>
        <g:if test="${eventoInstance.fax}">
            Fax: ${fieldValue(bean: eventoInstance, field: "fax")}<br/>
        </g:if>

    <div id="map_canvas" style="width: 600px; height: 530px"></div>

        <script type="text/javascript">
//            function iniciar(){
                var myLatlng = new google.maps.LatLng(${eventoInstance.direccion.latitud},${eventoInstance.direccion.longitud});
                var myOptions = {
                    zoom: 16,
                    center: myLatlng,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                    };

                var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

                var marker = new google.maps.Marker({
                    position: new google.maps.LatLng(${eventoInstance.direccion.latitud},${eventoInstance.direccion.longitud}),
                    draggable: false
                });
                marker.setMap(map);

//            }
        </script>
    </body>
</html>